"use strict";

angular.module('app.project', [ 'ui.router'])

.filter('signalfilter', function () {
    return function (input) {
        // input是我们传入的字符串
        if (input < 20)
            return "styles/img/signal-L.png";
        else
            return "styles/img/signal-H.png";
    }
})
angular.module('app.project').config(function ($stateProvider) {

    $stateProvider
        .state('app.project', {
            abstract: true,
            data: {
                title: '项目管理'
            }
        })


         .state('app.project.add_newProject', {
             url: '/add_newProject',
            //  abstract: true,
             views: {
                 "content@app": {
                     controller: 'Add_newProjectCtrl',
                     templateUrl: 'app/project/views/add_newProject.html'
                 }

             },
             data: {
                 title: '油罐编辑',
                 level: 'level_8'

             }
        })
        .state('app.project.add_newProject.projectTemplate', {
            url: '/projecttemplate',
            //abstract: true,
            data: {
                title: '设备信息',
                level: 'level_8'
            },
            views: {
                'project_a@app.project_a': {
                    controller:'ProjectModelCtrl',
                    templateUrl: 'app/project/views/project_m.html'
                }
            }

        })
       .state('app.project.myallprojects', {
           url: '/myallprojects/:project_id',
           views: {
               "content@app": {
                   controller: 'MyAllProjectCtrl',
                   templateUrl: 'app/project/views/myallproject.html'
               }

           },
           data: {
               title: '库区总览',
               level: 'level_8'

           }
       })
       .state('app.project.project_detail', {
        url: '/project_detail',
        views: {
            "content@app": {
                controller: 'ProjectDetailCtrl',
                templateUrl: 'app/project/views/projectDetail.html'
            }

        },
        data: {
            title: '库区详情',
            level: 'level_8'

        }
    })
       
    
});